import request from '@/utils/request'

// 查询卡片管理列表
export function listCards(query) {
  return request({
    url: '/system/cards/list',
    method: 'get',
    params: query
  })
}

// 查询卡片管理详细
export function getCards(id) {
  return request({
    url: '/system/cards/' + id,
    method: 'get'
  })
}

// 新增卡片管理
export function addCards(data) {
  return request({
    url: '/system/cards',
    method: 'post',
    data: data
  })
}

// 修改卡片管理
export function updateCards(data) {
  return request({
    url: '/system/cards',
    method: 'put',
    data: data
  })
}

// 删除卡片管理
export function delCards(id) {
  return request({
    url: '/system/cards/' + id,
    method: 'delete'
  })

}// 查询绑定套餐
export function queryPackege(data) {
  return request({
    url: '/system/package/withCard',
    method: 'get',
    params: data
  })}

  // 绑定套餐
export function setCardAndPackages(data) {
  return request({
    url: '/system/package/setCardAndPackages',
    method: 'post',
    data: data
  })}
  // 解绑定套餐
  export function setCardAndUnPackages(data) {
  return request({
    url: '/system/package/setCardAndUnPackages',
    method: 'post',
    data: data
  })
}
